package com.shishuo.cms.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.shishuo.cms.dao.UserDao;
import com.shishuo.cms.entity.UserEntity;

@Service
public class UserService extends BaseService<UserEntity, Integer> {
	
	private UserDao userDao;

	@Autowired
	//@Qualifier("userDao") 
	public void setAdminDao(UserDao userDao) {
		setBaseDao(userDao);
		this.userDao=userDao;
	}

	public UserEntity getSingleUser(String userName) {
		return userDao.getSingleUser(userName);
	}

	public int updateUserStatus(int id, int status) {
		return userDao.updateUserStatus(id, status);
	}

	public int delUsers(Integer[] userIds) {
		return userDao.delUsers(userIds);
	}

	public boolean existUser(String userName) {
		return userDao.existUser(userName);
	}


}
